<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>数据查询</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script src="<%=basePath%>template/common/js/jquery-1.9.1.min.js"></script>
<script src="<%=basePath%>template/common/js/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>template/common/css/Style.css" />
<script type="text/javascript" src="<%=basePath%>template/common/js/function.js"></script>
<script type="text/javascript" src="<%=basePath%>template/common/js/formsubmit.js"></script>
<script type="text/javascript" src="<%=basePath%>template/common/js/dp/js/ui.datepicker-zh-cn.js"></script>
<script type="text/javascript" src="<%=basePath%>template/common/js/dp/js/jquery-ui-timepicker-addon.js"></script>
<link href="<%=basePath%>template/common/js/dp/css/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath%>template/common/js/datetime.js"></script>
<link href="<%=basePath%>template/common/css/defaultTheme.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>template/common/css/myTheme.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>template/common/css/window.css" type="text/css" rel="stylesheet" />
<script src="<%=basePath%>template/common/js/window.js"></script>
<link href="<%=basePath%>template/common/css/ui.jqgrid.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=basePath%>template/common/js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="<%=basePath%>template/common/js/grid.locale-cn.js"></script>
<%-- <script type="text/javascript" src="<%=basePath %>template/common/js/jquery-1.7.js"></script> --%>
<script type="text/javascript" src="<%=basePath %>template/common/js/calendar/WdatePicker.js"></script>
        <link href="<%=basePath%>template/common/css/style1.css" rel="stylesheet" type="text/css"/>
   <link href="<%=basePath%>template/common/css2/defaultTheme.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>template/common/css2/myTheme.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>template/common/css2/window.css" type="text/css" rel="stylesheet" />     
    <script type="text/javascript">
        function ShowMenu(id) {
            var className = document.getElementById('menu' + id).className;
            if(className.indexOf('curr')==-1)
                document.getElementById('menu' + id).className = 'mouseover';
            else
                document.getElementById('menu' + id).className = 'curr mouseover';
            document.getElementById('ul'+id).style.display = 'block';
        }
        function HideMenu(id) {
            var className = document.getElementById('menu' + id).className;
            if (className.indexOf('curr') == -1)
                document.getElementById('menu' + id).className = '';
            else
                document.getElementById('menu' + id).className = 'curr';
            document.getElementById('ul' + id).style.display = 'none';
        }
        var oldOld = null;
        function ShowMenuDd(obj) {
            if (oldOld == obj) return;
            if (oldOld != null) {
                oldOld.className = '';
            }
            obj.className = 'visible';
            oldOld = obj;
        }

        var speed3 = 10; //速度数值越大速度越慢
        var maxWidth = 0;
        window.onload = function () {
            maxWidth = document.getElementById("divScrollCommend").scrollWidth;
            document.getElementById("tdScroll2").innerHTML = document.getElementById("tdScroll1").innerHTML;
            var MyMar = setInterval(Marquee, speed3);
            document.getElementById("divScrollCommend").onmouseover = function () { clearInterval(MyMar) }
            document.getElementById("divScrollCommend").onmouseout = function () { MyMar = setInterval(Marquee, speed3) }
        }

        function Marquee() {
            var left = parseInt(document.getElementById("divScrollCommend").style.left);
            if (left + maxWidth == 0) {
                left = 0;
            }
            else {
                left--;
            }
            document.getElementById("divScrollCommend").style.left = left + 'px';
        }
    </script>
		<SCRIPT type="text/javascript">
		function search(){
			var beginTime = document.getElementById("beginTime").value;
			var endTime = document.getElementById("endTime").value;
			if(beginTime>=endTime){
				alert("结束时间必须大于开始时间");
				return;
			}
			document.getElementById("form").action =  "<%=basePath%>data/item_data!index.action?beginTime="+beginTime+"&endTime="+endTime;
			document.getElementById("form").submit(); 
			//var frame = document.getElementById("listFrame");
			//frame.style.display = 'block';
			//frame.src = "<%=basePath%>data/item_data!index.action?beginTime="+beginTime+"&endTime="+endTime
		}
	</SCRIPT>
	</head>
<form action="<%=basePath%>data/item_data!list.action" id="form">
	<body>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td>
                        <div class="Headerout1">
                            <div class="Footerout21">
                                <div class="Wrapper1">
                                    <div class="wrapup">
<div align="right" style="padding-top:20px;padding-right:200px">
	用户名: Admin <a href="http://localhost:8080/yalu/loginServlet?fun=out">注销</a>
</div>	                            	
<div align="left" style="padding-left:200px;padding-top:20px">
<img alt="" title="" src="<%=basePath%>template/common/images/logo.jpg" /></div>
                                    </div>
                                    <div><strong><font size="5px">电子商务报表分析平台</font></strong></div>
    <div class="top-border" style="padding-top:50px">
        <div style="width:100%;position:absolute;bottom:0;left:0;">
            <div class="menu-border">
                <div class="menu-m">
                    <a href="###" title="平台管理" id="menuAboutUs" onmouseover="ShowMenu('AboutUs')" onmouseout="HideMenu('AboutUs')">平台管理</a>
                    <a href="###" title="报表功能" style="width:120px;" id="menuSolution" onmouseover="ShowMenu('Solution')" onmouseout="HideMenu('Solution')">报表功能</a>
                    <a href="###" title="系统管理" id="menuService" onmouseover="ShowMenu('Service')" onmouseout="HideMenu('Service')">系统管理</a>
                </div>
            </div>
        </div>
    </div>                                
    <div class="menu-popup">

    	  <ul id="ulAboutUs" onmouseover="ShowMenu('AboutUs')" onmouseout="HideMenu('AboutUs')" style="left:15px;width:120px;">
    	  	
            <li><a href="<%=basePath%>data/item_data!index.action" title="量子数据">量子数据</a></li>
            <li><a href="###" title="店铺属性">店铺属性</a></li>
             <li><a href="###" title="销售成本/任务成本">销售成本/任务成本</a></li>
             <li><a href="###" title="入仓销售">入仓销售</a></li>
             <li><a href="###" title="运费">运费</a></li>
             <li><a href="###" title="退货原因">退货原因</a></li>
             <li><a href="###" title="仓库辖区">仓库辖区</a></li>
             <li><a href="###" title="快递公司">快递公司</a></li>
             <li><a href="###" title="店铺属性参数">店铺属性参数</a></li>
        </ul>
        <ul id="ulSolution" onmouseover="ShowMenu('Solution')" onmouseout="HideMenu('Solution')" style="left:117px;width:120px;">
            <li><a href="dailySales_search.html" title="每日报表">每日报表</a></li>
            <li><a href="###" title="销售统计">销售统计</a></li>
            <li><a href="###" title="多样统计">多样统计</a></li>
            <li><a href="###" title="退货分析">退货分析 </a></li>
            <li><a href="###" title="发货分析">发货分析</a></li>
        </ul>
        <ul id="ulService" onmouseover="ShowMenu('Service')" onmouseout="HideMenu('Service')" style="left:239px;">
            <li><a href="dailySales_search.html" title="账号管理">账号管理</a></li>
            <li><a href="###" title="权限群组">权限群组</a></li>
        </ul>
        
    </div>
    	<div class="Container">
    	<table width="100%" cellspacing="0" cellpadding="0" border="0" class="h">
    <tbody><tr>
            <td><h1>量子数据 - 查询结果</h1></td>
            <td style="text-align: right;">
                <input type="button" value="返回" onclick="window.location='quantum_queryServlet'" class="button_">
            </td></tr>
    </tbody>
</table>
<table>
<tr>
				<td width="12%" class="listheadbg">
					开始时间:
				</td>
				<td align=center width="10%">
					<input type="text" id="beginTime" name="beginTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<td width="10%" class="listheadbg">
					结束时间
				</td>
				<td align=center width="20%">
					<input type="text" id="endTime" name="endTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<td><button type="button" onclick="search()">
					查询
				</button></td>
				
			</tr></table>
 <table id="list2" style="padding-left:200px" width="70%" class="fancyTable">
 			
 <tr style="background: #008B8B;">
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">ID</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">时间</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">店铺</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">浏览量</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">访客数</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">客单价</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">人均成交件数</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">全店成交转化率</font></strong></td>
   			<td style="background: #008B8B;"> <strong><font color="#FFFFFF">免费流量</font></strong></td>
			</tr>
		
		<s:iterator var="data" value="#request.dataList"  status="st" >
		<tr>
   			<td>${data.itemDataKey.no }</td>
   			<td>${data.itemDataKey.data_date }</td>
   			<td>${data.store_name }</td>
   			<td>${data.views }</td>
   			<td>${data.guests }</td>
   			<td>${data.avg_item }</td>
   			<td>${data.avg_cost }</td>
   			<td>${data.success_rate }</td>
   			<td>${data.networkio }</td>
   			</tr>
   		</s:iterator>
 </table>
    <div id="pager2"></div>
		<%-- <table cellspacing="0" cellpadding="0" width="70%" align="center"
			border="1" bordercolor="silver" style="border-collapse: collapse">
			<tr>
				<td width="12%" class="listheadbg">
					开始时间
				</td>
				<td align=center width="10%">
					<input type="text" id="beginTime" name="beginTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<td width="10%" class="listheadbg">
					结束时间
				</td>
				<td align=center width="20%">
					<input type="text" id="endTime" name="endTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<td><button type="button" onclick="search()">
					查询
				</button></td>
				
			</tr>
			<tr>
   			<td>店铺ID</td>
   			<td>时间</td>
   			<td>店铺</td>
   			<td>浏览量</td>
   			<td>访客数</td>
   			<td>客单价</td>
   			<td>人均成交件数</td>
   			<td>全店成交转化率</td>
   			<td>免费流量</td>
			</tr>
			
					<s:iterator var="data" value="#request.dataList"  status="st" >
		<tr>
   			<td>${data.itemDataKey.no }</td>
   			<td>${data.itemDataKey.data_date }</td>
   			<td>${data.store_name }</td>
   			<td>${data.views }</td>
   			<td>${data.guests }</td>
   			<td>${data.avg_item }</td>
   			<td>${data.avg_cost }</td>
   			<td>${data.success_rate }</td>
   			<td>${data.networkio }</td>
   			</tr>
   		</s:iterator>
   		
   			<!-- <iframe id="listFrame" style="width:70%;height:80%"></iframe> --> 

   		
		</table>

      </div>

		 </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table> --%>
        <br />
        <script>
                            $(document).ready(function(){
                                $('input[name="api_type"]').each(function(){                       
                                    $(this).change(function(){
                                        var api_id = $(this).attr("id");
                                        switch(api_id){
                                            case "edbInStoreGet":                                    
                                            case "edbOutStoreGet":
                                                $('#type').attr("disabled", false);
                                                $('#date_type').attr("disabled", false);
                                                $('#end_time').attr("disabled", true);
                                                $('#begin_time').attr("disabled", true);
                                                break;
                                            case "edbProductBaseInfoGet":
                                              
                                            case "edbTradReturnGet":
                                                $('#type').attr("disabled", true);
                                                $('#date_type').attr("disabled", true);
                                                $('#end_time').attr("disabled", false);
                                                $('#begin_time').attr("disabled", false);
                                                break;
                                            case "edbTradeGet":
                                                $('#type').attr("disabled", true);
                                                $('#date_type').attr("disabled", false);
                                                $('#end_time').attr("disabled", false);
                                                $('#begin_time').attr("disabled", false);
                                                break;
                                        }
                                        
                                    });
                                });
                            })
        </script>
        </form>
	</body>
	
		<!-- <br>
		<table cellspacing="0" cellpadding="0" width="99%" align="center"
			border="1" bordercolor="silver" style="border-collapse: collapse">
			<tr>
				<td width="12%" class="listheadbg">
					开始时间
				</td>
				<td align=center width="10%">
					<input type="text" id="beginTime" name="beginTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<td width="10%" class="listheadbg">
					结束时间
				</td>
				<td align=center width="20%">
					<input type="text" id="endTime" name="endTime" value=""
						onFocus="new WdatePicker(this,'%Y/%M/%D',true,'whyGreen')">
				</td>
				<button type="button" onclick="search()">
					查询
				</button>
			</tr>
		</table>
		<iframe id="listFrame" style="width:99%;height:80%">
		</iframe> 
	</body>-->
</html>
